/**
 * Modal 组件文档配置
 */

export const modalProps = [
  {
    name: 'visible',
    type: 'boolean',
    default: 'false',
    description: '是否显示弹窗',
  },
  {
    name: 'size',
    type: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | 'full'",
    default: "'md'",
    description: '弹窗尺寸',
  },
  {
    name: 'maskClosable',
    type: 'boolean',
    default: 'true',
    description: '是否点击遮罩关闭',
  },
  {
    name: 'escClosable',
    type: 'boolean',
    default: 'true',
    description: '是否按ESC键关闭',
  },
  {
    name: 'customClass',
    type: 'string',
    default: "''",
    description: '自定义样式类',
  },
  {
    name: 'backdropClass',
    type: 'string',
    default: "''",
    description: '自定义遮罩层样式类',
  },
]

export const modalEmits = [
  {
    name: 'close',
    description: '关闭事件',
    parameters: [],
  },
  {
    name: 'show',
    description: '显示事件',
    parameters: [],
  },
  {
    name: 'hide',
    description: '隐藏事件',
    parameters: [],
  },
  {
    name: 'update:visible',
    description: '更新visible状态',
    parameters: [
      {
        name: 'value',
        type: 'boolean',
        description: '新的visible状态值',
      },
    ],
  },
]

export const modalSlots = [
  {
    name: 'backdrop',
    description: '自定义遮罩层',
    parameters: [],
  },
  {
    name: 'header',
    description: '自定义头部',
    parameters: [
      {
        name: 'close',
        type: '() => void',
        description: '关闭弹窗的函数',
      },
    ],
  },
  {
    name: 'content',
    description: '自定义内容区域',
    parameters: [
      {
        name: 'close',
        type: '() => void',
        description: '关闭弹窗的函数',
      },
    ],
  },
  {
    name: 'footer',
    description: '自定义底部',
    parameters: [
      {
        name: 'close',
        type: '() => void',
        description: '关闭弹窗的函数',
      },
    ],
  },
]
